package javazuoye06.zuoye05;

import java.util.stream.Collectors;

public class zuoye04 {
    public static void main(String[] args) {
        String s = "YUANzhi1987";
        String s1 = "";
        System.out.println(s1);
        s1= s.chars().mapToObj(c->(char)c).map(c->aaaa(c)).map(String::valueOf).collect(Collectors.joining());
    System.out.println(s1);
    }

    public static char aaaa(char c) {
            if (c >= 'A' && c <= 'Z') {
               return  (char) (c + 33);
            }
            else if (c >= 'a' && c <= 'z') {

                if (c >= 'a' && c <= 'c') {
                    return  '2';
                }
                if (c > 'c' && c <= 'f') {
                    return  '3';
                }
                if (c > 'f' && c <= 'i') {
                    return   '4';
                }
                if (c >= 'j' && c <= 'l') {
                    return   '5';
                }
                if (c >= 'm' && c <= 'o') {
                    return '6';
                }
                if (c >= 'p' && c <= 's') {
                    return  '7';
                }
                if (c >= 't' && c <= 'y') {
                    return   '8';
                }
                if (c >= 'w' && c <= 'z') {
                    return '9';
                }
            } else {
                return  c;
            }

        return c;
    }
}